package com.framework.bdf4j.sysadm.service.impl;

import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.framework.bdf4j.sysadm.entity.SysWelcome;
import com.framework.bdf4j.sysadm.mapper.SysWelcomeMapper;
import com.framework.bdf4j.sysadm.service.SysWelcomeService;

import cn.hutool.core.map.MapUtil;
import lombok.AllArgsConstructor;

/**
 * 快速导航Service业务层处理
 * 
 * @author cfss
 * @date 2020-06-12
 */
@Service
@AllArgsConstructor
public class SysWelcomeServiceImpl extends ServiceImpl<SysWelcomeMapper, SysWelcome> implements SysWelcomeService {

	@Transactional(rollbackFor = Exception.class)
	@Override
	public Boolean updateWelcome(Map map) {
		Integer sourceWelId=MapUtil.getInt(map, "sourceWelId");
		Integer sourceSort=MapUtil.getInt(map, "sourceSort");
		baseMapper.updateWelcomeSort(sourceWelId, sourceSort);
		Integer targetWelId=MapUtil.getInt(map, "targetWelId");
		Integer targetSort=MapUtil.getInt(map, "targetSort");
		baseMapper.updateWelcomeSort(targetWelId, targetSort);

		
		return true;
	}
}
